 let fs=require('fs');
 var a=0;
 var b=0;
 function create(){
let fileName="./files/"+a+".txt"
    fs.writeFileSync(fileName,"创建时间是：")
    a++;
fs.stat(fileName,function(err,stat){
    fs.writeFileSync(fileName, stat.birthtime+'',{flag:"a"});
})
    if(a<1000){
        create();
    }
 }
 create();

function createA(){
    let fileName="./filess/"+b+".txt"
    fs.writeFile(fileName,"创建时间是：",(err)=>{
        if(err){
            console.log('ss');
        }
    })
    setTimeout(() => {
            let date=fs.statSync(fileName);
    
    fs.writeFileSync(fileName,date.birthtime+'',{flag:"a"})
    }, 20);
    b++;
    if(b<1000){
        createA();
    }

}
createA();